<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断润年</title>
</head>

<body>
    <script>
        var x = Number(prompt("请输入你的出生年份。"));
        if (x % 4 == 0 && x % 100 != 0 || x % 100 == 0 && x % 400 == 0)
            alert("true");
        else
            alert("false");

    </script>
</body>

</html>